package com.ddedu.service.impl;

import com.ddedu.dao.StudentDao;
import com.ddedu.entity.Student;
import com.ddedu.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao studentDao;

    /**
     * 添加一条学生信息
     * @param student
     */
    @Override
    public void insertStudentOne(Student student) {
        if (student == null)  {
            throw new RuntimeException("信息为空！");
        }
        studentDao.insertStudentOne(student);
    }
}
